package IC.AST;
/**
 * A base interface for the AST interface hierarchy 
 */

import IC.Analyzer.SymTable;

public abstract class ASTNode {
	private int 	line;
	private int		column;
	private String fileName;
	private SymTable symTab;

	abstract public <D,U> U accept(PropogatingVisitor<D,U> v, D context) throws Exception;

	public ASTNode(String fileName, int line, int column) {
		this.line = line;
		this.column = column;
		this.fileName = fileName;
	}

	/**
	 * @return the column
	 */
	public int getColumn() {
		return column;
	}

	/**
	 * @return the line
	 */
	public int getLine() {
		return line;
	}

	/**
	 * @return the file name
	 */
	public String getFileName() {
		return fileName;
	}

	/**
	 * @return the symbol table
	 */
	public SymTable getSymTab() {
		return symTab;
	}

	/**
	 * @param symTab the symbol table to set
	 */
	public void setSymTab(SymTable symTab) {
		this.symTab = symTab;
	}

}

